-
Notifications
You must be signed in to change notification settings - Fork 6
an initial idea for parsing and storing defaults #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
multimeric
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a test case, following the same points from #15.
acclimatise/cli_types.py
Outdated
| A data type used in the command-line | ||
| """ | ||
|
|
||
| default: object = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Firstly, can this type annotation be optional please? e.g.
Optional[object] - Secondly, and this is annoying I know, but could you add a type annotation override for the subclasses, such that
CliInthasdefault: Optional[int]etc?
Can do, but I never found the time to learn these python testing frameworks. If you could provide me the framework I can fill in the details I guess. |
|
The framework is pytest, which is the simplest testing framework. You just define a |
and use them as fallback
7e681b1 to
35241ef
Compare
Just an idea. No idea if useful / correct. Might be better to do it at another place.
I guess also regular expressions testing if the extracted value is really an integer, float, list, ... would be a good idea.